/**
 * test wait(), notify()
 */
class T {

	public synchronized void get() {
		println 'aa';
		wait()
		println 'bb'
	}
	
	public synchronized void put() {
	
		notify()	
	}
}

t = new T()
Thread.start {
	while (true) {
		t.get()
	}
}

Thread.start {
	while (true) {
		Thread.sleep(5000)
		t.put()
	}
}